// GlutTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


#include <GL\glut.h>
 
void Renderuj()
{
 
glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
glClear (GL_COLOR_BUFFER_BIT);
 
    glPushMatrix ();
	glColor3f (1.0f, 0.0f, 0.0f);
	//glRectf(0.0f, 1.0f, 0.87f, -0.5f);
        glBegin (GL_TRIANGLES);
            glColor3f (1.0f, 0.0f, 0.0f);   glVertex2f (0.0f, 1.0f);
            glColor3f (0.0f, 1.0f, 0.0f);   glVertex2f (0.87f, -0.5f);
            glColor3f (0.0f, 0.0f, 1.0f);   glVertex2f (-0.87f, -0.5f);
        glEnd ();
    glPopMatrix ();
 
glutSwapBuffers();
 
}

void zmienRozmiar(int w,int h){

}
 
int main (int argc, char *argv[])
{
 
    glutInit (&argc,argv);
    glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);
    glutInitWindowSize (800,600);
    glutCreateWindow ("OGL in VS2010");
    glutDisplayFunc (Renderuj);
	glutReshapeFunc(zmienRozmiar);
 
    Renderuj();
 
    glutMainLoop ();
    return 0;
}
